#include <iostream>
#include <cstring>
using namespace std;

class Person
{
protected:
  char Name[10];
  char Sex;
  int Age;

public:
  void Register(char *name, int age)
  {
    strcpy(Name, name);
    Age = age;
    cout << "constructor of person " << Name << endl;
  }

  ~Person()
  {
    cout << "deconstructor of person " << Name << endl;
  };
};

class Student : public Person
{
private:
  char ClassName[10];
  Person Monitor; //班长
  public:
  Student(char *name, int age, char *classname, char *name1, int age1)//name1 age1是班长的信息
  {
    Person::Register(name1, age1);
    strcpy(ClassName, classname);
  }
  ~Student();
};

int main()
{
  char name1[10],name[10];
  int age1,age;
  cin >>name>>age;
  cin >>name1>>age1;
  Person p1;
  Person p;
  p.Register(name, age);
  p1.Register(name1, age1);
  return 0;
}
